import { defHttp } from '/@/utils/http/axios'
import { WarningListSo, WarningListResult, WarningRuleResult } from './model/warningModel'
import { BasicFetchResult, BasicPageParams, BasicQueryModel } from '/@/api/model/baseModel'

enum Api {
  listWarning = '/warning/list',
  listWarningRule = '/warning/rule',
}

/**
 * @description: Get user menu based on id
 */

export const listWarning = (data: BasicPageParams<WarningListSo>) => {
  return defHttp.post<BasicFetchResult<WarningListResult>>({ url: Api.listWarning, data })
}

export const listWarningRule = (data: BasicPageParams<BasicQueryModel>) => {
  return defHttp.post<BasicFetchResult<WarningRuleResult>>({ url: Api.listWarningRule, data })
}
